package com.wenwu.dao;

import java.sql.SQLException;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.wenwu.common.bean.RelicsAttachment;
import com.wenwu.common.bean.RelicsAttachmentExample;

/**
 * @project RelicsProject-dao
 * @class RelicsAttachmentMapper.java
 * @author zhujiagui E-mail:<zhujiagui@zkingsoft.com>
 * @date 2015年5月4日 下午4:14:41
 * @description 附件管理模块
 */
public interface RelicsAttachmentMapper extends Dao {
	int countByExample(RelicsAttachmentExample example);

	int deleteByExample(RelicsAttachmentExample example);

	int deleteByPrimaryKey(Integer attachmentId);

	int insert(RelicsAttachment record);

	int insertSelective(RelicsAttachment record);

	List<RelicsAttachment> selectByExample(RelicsAttachmentExample example);

	RelicsAttachment selectByPrimaryKey(Integer attachmentId);

	int updateByExampleSelective(@Param("record") RelicsAttachment record,
			@Param("example") RelicsAttachmentExample example);

	int updateByExample(@Param("record") RelicsAttachment record,
			@Param("example") RelicsAttachmentExample example);

	int updateByPrimaryKeySelective(RelicsAttachment record);

	int updateByPrimaryKey(RelicsAttachment record);

	int insertList(@Param("list") List<RelicsAttachment> list);

	int deleteByKey(@Param("key") Integer key,@Param("ownList") List<Integer> ownList)throws SQLException;

	List<RelicsAttachment> selectAttachmentListByKey(@Param("key") Integer key,@Param("owns") List<Integer> owns)
			throws SQLException;

	List<RelicsAttachment> selectAttachmentListByKeyAndTable(@Param("key") Integer key,
			@Param("tableName") String tableName,@Param("filedId1") String filedId1,@Param("filedId2") String filedId2,@Param("owns") List<Integer> owns) throws SQLException;
}